
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <title>combineLatest · 学习 RxJS 操作符</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.1.1">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="concat.html" />
    
    
    <link rel="prev" href="combineall.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"RxJS-CN","repo":"learn-rxjs-operators","type":"star","size":"small","count":true},{"user":"RxJS-CN","repo":"learn-rxjs-operators","type":"fork","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" >
            
                <a target="_blank" href="https://github.com/RxJS-CN/learn-rxjs-operators">
            
                    
                    学习 RxJS 操作符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../about/README.md">
            
                <span>
            
                    
                    关于中文版
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">学习 RxJS</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../">
            
                <a href="../../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../">
            
                <a href="../">
            
                    
                    操作符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="./">
            
                <a href="./">
            
                    
                    组合
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" data-path="combineall.html">
            
                <a href="combineall.html">
            
                    
                    combineAll
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="2.2.1.2" data-path="combinelatest.html">
            
                <a href="combinelatest.html">
            
                    
                    combineLatest
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.3" data-path="concat.html">
            
                <a href="concat.html">
            
                    
                    concat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.4" data-path="concatall.html">
            
                <a href="concatall.html">
            
                    
                    concatAll
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.5" data-path="forkjoin.html">
            
                <a href="forkjoin.html">
            
                    
                    forkJoin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.6" data-path="merge.html">
            
                <a href="merge.html">
            
                    
                    merge
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.7" data-path="mergeall.html">
            
                <a href="mergeall.html">
            
                    
                    mergeAll
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.8" data-path="pairwise.html">
            
                <a href="pairwise.html">
            
                    
                    pairwise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.9" data-path="race.html">
            
                <a href="race.html">
            
                    
                    race
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.10" data-path="startwith.html">
            
                <a href="startwith.html">
            
                    
                    startWith
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.11" data-path="withlatestfrom.html">
            
                <a href="withlatestfrom.html">
            
                    
                    withLatestFrom
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.12" data-path="zip.html">
            
                <a href="zip.html">
            
                    
                    zip
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="../conditional/">
            
                <a href="../conditional/">
            
                    
                    条件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.2.1" data-path="../conditional/defaultifempty.html">
            
                <a href="../conditional/defaultifempty.html">
            
                    
                    defaultIfEmpty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.2.2" data-path="../conditional/every.html">
            
                <a href="../conditional/every.html">
            
                    
                    every
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="../creation/">
            
                <a href="../creation/">
            
                    
                    创建
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.3.1" data-path="../creation/create.html">
            
                <a href="../creation/create.html">
            
                    
                    create
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.2" data-path="../creation/empty.html">
            
                <a href="../creation/empty.html">
            
                    
                    empty
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.3" data-path="../creation/from.html">
            
                <a href="../creation/from.html">
            
                    
                    from
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.4" data-path="../creation/fromevent.html">
            
                <a href="../creation/fromevent.html">
            
                    
                    fromEvent
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.5" data-path="../creation/frompromise.html">
            
                <a href="../creation/frompromise.html">
            
                    
                    fromPromise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.6" data-path="../creation/interval.html">
            
                <a href="../creation/interval.html">
            
                    
                    interval
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.7" data-path="../creation/of.html">
            
                <a href="../creation/of.html">
            
                    
                    of
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.8" data-path="../creation/range.html">
            
                <a href="../creation/range.html">
            
                    
                    range
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.9" data-path="../creation/throw.html">
            
                <a href="../creation/throw.html">
            
                    
                    throw
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.10" data-path="../creation/timer.html">
            
                <a href="../creation/timer.html">
            
                    
                    timer
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="../error_handling/">
            
                <a href="../error_handling/">
            
                    
                    错误处理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.4.1" data-path="../error_handling/catch.html">
            
                <a href="../error_handling/catch.html">
            
                    
                    catchError
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.4.2" data-path="../error_handling/retry.html">
            
                <a href="../error_handling/retry.html">
            
                    
                    retry
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.4.3" data-path="../error_handling/retrywhen.html">
            
                <a href="../error_handling/retrywhen.html">
            
                    
                    retryWhen
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="../multicasting/">
            
                <a href="../multicasting/">
            
                    
                    多播
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.5.1" data-path="../multicasting/publish.html">
            
                <a href="../multicasting/publish.html">
            
                    
                    publish
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.5.2" data-path="../multicasting/multicast.html">
            
                <a href="../multicasting/multicast.html">
            
                    
                    multicast
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.5.3" data-path="../multicasting/share.html">
            
                <a href="../multicasting/share.html">
            
                    
                    share
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.5.4" data-path="../multicasting/sharereplay.html">
            
                <a href="../multicasting/sharereplay.html">
            
                    
                    shareReplay
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.6" data-path="../filtering/">
            
                <a href="../filtering/">
            
                    
                    过滤
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.6.1" data-path="../filtering/debounce.html">
            
                <a href="../filtering/debounce.html">
            
                    
                    debounce
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.2" data-path="../filtering/debouncetime.html">
            
                <a href="../filtering/debouncetime.html">
            
                    
                    debounceTime
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.3" data-path="../filtering/distinctuntilchanged.html">
            
                <a href="../filtering/distinctuntilchanged.html">
            
                    
                    distinctUntilChanged
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.4" data-path="../filtering/filter.html">
            
                <a href="../filtering/filter.html">
            
                    
                    filter
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.5" data-path="../filtering/first.html">
            
                <a href="../filtering/first.html">
            
                    
                    first
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.6" data-path="../filtering/ignoreelements.html">
            
                <a href="../filtering/ignoreelements.html">
            
                    
                    ignoreElements
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.7" data-path="../filtering/last.html">
            
                <a href="../filtering/last.html">
            
                    
                    last
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.8" data-path="../filtering/sample.html">
            
                <a href="../filtering/sample.html">
            
                    
                    sample
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.9" data-path="../filtering/single.html">
            
                <a href="../filtering/single.html">
            
                    
                    single
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.10" data-path="../filtering/skip.html">
            
                <a href="../filtering/skip.html">
            
                    
                    skip
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.11" data-path="../filtering/skipuntil.html">
            
                <a href="../filtering/skipuntil.html">
            
                    
                    skipUntil
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.12" data-path="../filtering/skipwhile.html">
            
                <a href="../filtering/skipwhile.html">
            
                    
                    skipWhile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.13" data-path="../filtering/take.html">
            
                <a href="../filtering/take.html">
            
                    
                    take
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.14" data-path="../filtering/takeuntil.html">
            
                <a href="../filtering/takeuntil.html">
            
                    
                    takeUntil
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.15" data-path="../filtering/takewhile.html">
            
                <a href="../filtering/takewhile.html">
            
                    
                    takeWhile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.16" data-path="../filtering/throttle.html">
            
                <a href="../filtering/throttle.html">
            
                    
                    throttle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.6.17" data-path="../filtering/throttletime.html">
            
                <a href="../filtering/throttletime.html">
            
                    
                    throttleTime
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.7" data-path="../transformation/">
            
                <a href="../transformation/">
            
                    
                    转换
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.7.1" data-path="../transformation/buffer.html">
            
                <a href="../transformation/buffer.html">
            
                    
                    buffer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.2" data-path="../transformation/buffercount.html">
            
                <a href="../transformation/buffercount.html">
            
                    
                    bufferCount
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.3" data-path="../transformation/buffertime.html">
            
                <a href="../transformation/buffertime.html">
            
                    
                    bufferTime
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.4" data-path="../transformation/buffertoggle.html">
            
                <a href="../transformation/buffertoggle.html">
            
                    
                    bufferToggle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.5" data-path="../transformation/bufferwhen.html">
            
                <a href="../transformation/bufferwhen.html">
            
                    
                    bufferWhen
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.6" data-path="../transformation/concatmap.html">
            
                <a href="../transformation/concatmap.html">
            
                    
                    concatMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.7" data-path="../transformation/concatmapto.html">
            
                <a href="../transformation/concatmapto.html">
            
                    
                    concatMapTo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.8" data-path="../transformation/exhaustmap.html">
            
                <a href="../transformation/exhaustmap.html">
            
                    
                    exhaustMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.9" data-path="../transformation/expand.html">
            
                <a href="../transformation/expand.html">
            
                    
                    expand
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.10" data-path="../transformation/exhaustmap.html">
            
                <a href="../transformation/exhaustmap.html">
            
                    
                    exhaustMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.11" data-path="../transformation/groupby.html">
            
                <a href="../transformation/groupby.html">
            
                    
                    groupBy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.12" data-path="../transformation/map.html">
            
                <a href="../transformation/map.html">
            
                    
                    map
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.13" data-path="../transformation/mapto.html">
            
                <a href="../transformation/mapto.html">
            
                    
                    mapTo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.14" data-path="../transformation/mergemap.html">
            
                <a href="../transformation/mergemap.html">
            
                    
                    mergeMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.15" data-path="../transformation/partition.html">
            
                <a href="../transformation/partition.html">
            
                    
                    partition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.16" data-path="../transformation/pluck.html">
            
                <a href="../transformation/pluck.html">
            
                    
                    pluck
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.17" data-path="../transformation/reduce.html">
            
                <a href="../transformation/reduce.html">
            
                    
                    reduce
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.18" data-path="../transformation/scan.html">
            
                <a href="../transformation/scan.html">
            
                    
                    scan
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.19" data-path="../transformation/switchmap.html">
            
                <a href="../transformation/switchmap.html">
            
                    
                    switchMap
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.20" data-path="../transformation/window.html">
            
                <a href="../transformation/window.html">
            
                    
                    window
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.21" data-path="../transformation/windowcount.html">
            
                <a href="../transformation/windowcount.html">
            
                    
                    windowCount
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.22" data-path="../transformation/windowtime.html">
            
                <a href="../transformation/windowtime.html">
            
                    
                    windowTime
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.23" data-path="../transformation/windowtoggle.html">
            
                <a href="../transformation/windowtoggle.html">
            
                    
                    windowToggle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.7.24" data-path="../transformation/windowwhen.html">
            
                <a href="../transformation/windowwhen.html">
            
                    
                    windowWhen
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.8" data-path="../utility/">
            
                <a href="../utility/">
            
                    
                    工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.8.1" data-path="../utility/do.html">
            
                <a href="../utility/do.html">
            
                    
                    do
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.2" data-path="../utility/delay.html">
            
                <a href="../utility/delay.html">
            
                    
                    delay
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.3" data-path="../utility/delaywhen.html">
            
                <a href="../utility/delaywhen.html">
            
                    
                    delayWhen
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.4" data-path="../utility/dematerialize.html">
            
                <a href="../utility/dematerialize.html">
            
                    
                    dematerialize
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.5" data-path="../utility/let.html">
            
                <a href="../utility/let.html">
            
                    
                    let
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.6" data-path="../utility/timeout.html">
            
                <a href="../utility/timeout.html">
            
                    
                    timeout
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.8.7" data-path="../utility/topromise.html">
            
                <a href="../utility/topromise.html">
            
                    
                    toPromise
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.9" data-path="../complete.html">
            
                <a href="../complete.html">
            
                    
                    完整列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../../recipes/">
            
                <a href="../../recipes/">
            
                    
                    食谱
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../../recipes/smartcounter.html">
            
                <a href="../../recipes/smartcounter.html">
            
                    
                    智能计数器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../../recipes/progressbar.html">
            
                <a href="../../recipes/progressbar.html">
            
                    
                    进度条
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../../recipes/gameloop.html">
            
                <a href="../../recipes/gameloop.html">
            
                    
                    游戏循环
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../../concepts/">
            
                <a href="../../concepts/">
            
                    
                    概念
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="../../concepts/rxjs5-6.html">
            
                <a href="../../concepts/rxjs5-6.html">
            
                    
                    RxJS v5 -> v6 升级
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="../../concepts/operator-imports.html">
            
                <a href="../../concepts/operator-imports.html">
            
                    
                    理解操作符导入
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >combineLatest</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="combinelatest">combineLatest</h1>
<h4 id="&#x51FD;&#x6570;&#x7B7E;&#x540D;-combinelatestobservables-observable-project-function-observable">&#x51FD;&#x6570;&#x7B7E;&#x540D;: <code>combineLatest(observables: ...Observable, project: function): Observable</code></h4>
<h2 id="&#x5F53;&#x4EFB;&#x610F;-observable-&#x53D1;&#x51FA;&#x503C;&#x65F6;&#xFF0C;&#x53D1;&#x51FA;&#x6BCF;&#x4E2A;-observable-&#x7684;&#x6700;&#x65B0;&#x503C;&#x3002;">&#x5F53;&#x4EFB;&#x610F; observable &#x53D1;&#x51FA;&#x503C;&#x65F6;&#xFF0C;&#x53D1;&#x51FA;&#x6BCF;&#x4E2A; observable &#x7684;&#x6700;&#x65B0;&#x503C;&#x3002;</h2>
<hr>
<p><img align="absmiddle" alt=":bulb:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/bulb.png" title=":bulb:">  &#x6B64;&#x64CD;&#x4F5C;&#x7B26;&#x53EF;&#x4EE5;&#x65E2;&#x6709;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#xFF0C;&#x53C8;&#x6709;&#x5B9E;&#x4F8B;&#x65B9;&#x6CD5;&#xFF01;</p>
<p><img align="absmiddle" alt=":bulb:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/bulb.png" title=":bulb:">  &#x5F53;&#x6E90; observable &#x5B8C;&#x6210;&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <a href="combineall.html">combineAll</a> &#x6765;&#x5E94;&#x7528; combineLatest &#x4EE5;&#x53D1;&#x51FA; observables &#xFF01;</p>
<hr>
<h3 id="&#x4E3A;&#x4EC0;&#x4E48;&#x4F7F;&#x7528;-combinelatest&#xFF1F;">&#x4E3A;&#x4EC0;&#x4E48;&#x4F7F;&#x7528; <code>combineLatest</code>&#xFF1F;</h3>
<p>&#x5F53;&#x6709;&#x591A;&#x4E2A;&#x957F;&#x671F;&#x6D3B;&#x52A8;&#x7684; observables &#x4E14;&#x5B83;&#x4EEC;&#x4F9D;&#x9760;&#x5F7C;&#x6B64;&#x6765;&#x8FDB;&#x884C;&#x4E00;&#x4E9B;&#x8BA1;&#x7B97;&#x6216;&#x51B3;&#x5B9A;&#x65F6;&#xFF0C;&#x6B64;&#x64CD;&#x4F5C;&#x7B26;&#x662F;&#x6700;&#x9002;&#x5408;&#x7684;&#x3002;<a href="#%E7%A4%BA%E4%BE%8B%203%3A%20%E7%BB%84%E5%90%882%E4%B8%AA%E6%8C%89%E9%92%AE%E7%9A%84%E4%BA%8B%E4%BB%B6">&#x793A;&#x4F8B; 3</a>&#x53EF;&#x4F5C;&#x4E3A;&#x57FA;&#x7840;&#x793A;&#x4F8B;&#x6F14;&#x793A;&#xFF0C;&#x6765;&#x81EA;&#x591A;&#x4E2A;&#x6309;&#x94AE;&#x7684;&#x4E8B;&#x4EF6;&#x88AB;&#x7EC4;&#x5408;&#x5728;&#x4E00;&#x8D77;&#xFF0C;&#x4EE5;&#x751F;&#x6210;&#x6BCF;&#x4E2A;&#x6309;&#x94AE;&#x7684;&#x8BA1;&#x6570;&#x548C;&#x603B;&#x4F53;&#x603B;&#x6570;&#xFF0C;RxJS &#x6587;&#x6863;&#x4E2D;&#x7684; combineLatest &#x64CD;&#x4F5C;&#x7B26;&#x7684;&#x793A;&#x4F8B; <a href="http://cn.rx.js.org/class/es6/Observable.js~Observable.html#instance-method-combineLatest" target="_blank">BMI &#x8BA1;&#x7B97;</a> &#x4E5F;&#x53EF;&#x4F5C;&#x4E3A;&#x793A;&#x4F8B;&#x3002;</p>
<p>&#x6CE8;&#x610F;&#xFF0C;<strong><code>combineLatest</code> &#x76F4;&#x5230;&#x6BCF;&#x4E2A; observable &#x90FD;&#x81F3;&#x5C11;&#x53D1;&#x51FA;&#x4E00;&#x4E2A;&#x503C;&#x540E;&#x624D;&#x4F1A;&#x53D1;&#x51FA;&#x521D;&#x59CB;&#x503C;&#x3002;</strong>&#x8FD9;&#x548C; <a href="withlatestfrom.html"><code>withLatestFrom</code></a> &#x7684;&#x884C;&#x4E3A;&#x662F;&#x4E00;&#x81F4;&#x7684;&#xFF0C;&#x8FD9;&#x5E38;&#x5E38;&#x4F1A;&#x6210;&#x4E3A;&#x9677;&#x9631;&#xFF0C;&#x65E2;&#x6CA1;&#x6709;&#x8F93;&#x51FA;&#xFF0C;&#x4E5F;&#x4E0D;&#x62A5;&#x9519;&#xFF0C;&#x4F46;&#x662F;&#x4E00;&#x4E2A;(&#x6216;&#x591A;&#x4E2A;)&#x5185;&#x90E8; observables &#x53EF;&#x80FD;&#x65E0;&#x6CD5;&#x6B63;&#x5E38;&#x5DE5;&#x4F5C;&#xFF0C;&#x6216;&#x8005;&#x8BA2;&#x9605;&#x5EF6;&#x8FDF;&#x3002;</p>
<p>&#x6700;&#x540E;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x53EA;&#x9700;&#x8981; observables &#x53D1;&#x51FA;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x6216;&#x53EA;&#x9700;&#x8981;&#x5B83;&#x4EEC;&#x5B8C;&#x6210;&#x524D;&#x7684;&#x6700;&#x65B0;&#x503C;&#x65F6;&#xFF0C;<a href="forkjoin.html"><code>forkJoin</code></a> &#x4F1A;&#x662F;&#x66F4;&#x597D;&#x7684;&#x9009;&#x62E9;&#x3002;</p>
<div class="ua-ad"><a href="https://ultimateangular.com/?ref=76683_kee7y7vk" target="_blank"><img src="https://ultimateangular.com/assets/img/banners/ua-leader.svg"></a></div>

<h3 id="&#x793A;&#x4F8B;">&#x793A;&#x4F8B;</h3>
<p>( <a href="https://github.com/btroncone/learn-rxjs/blob/master/operators/specs/combination/combinelatest-spec.ts" target="_blank">&#x793A;&#x4F8B;&#x6D4B;&#x8BD5;</a> )</p>
<h5 id="&#x793A;&#x4F8B;-1-&#x7EC4;&#x5408;3&#x4E2A;&#x5B9A;&#x65F6;&#x53D1;&#x9001;&#x7684;-observables">&#x793A;&#x4F8B; 1: &#x7EC4;&#x5408;3&#x4E2A;&#x5B9A;&#x65F6;&#x53D1;&#x9001;&#x7684; observables</h5>
<p>(
<a href="https://stackblitz.com/edit/typescript-vadvm2?file=index.ts&amp;devtoolsheight=100" target="_blank">StackBlitz</a>
| <a href="http://jsbin.com/tinumesuda/1/edit?js,console" target="_blank">jsBin</a> |
<a href="https://jsfiddle.net/btroncone/mygy9j86/69/" target="_blank">jsFiddle</a> )</p>
<pre class="language-"><code class="lang-js"><span class="token comment">// RxJS v6+</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> timer<span class="token punctuation">,</span> combineLatest <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;rxjs&apos;</span><span class="token punctuation">;</span>

<span class="token comment">// timerOne &#x5728;1&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerOne <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// timerTwo &#x5728;2&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerTwo <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">2000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// timerThree &#x5728;3&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerThree <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">3000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// &#x5F53;&#x4E00;&#x4E2A; timer &#x53D1;&#x51FA;&#x503C;&#x65F6;&#xFF0C;&#x5C06;&#x6BCF;&#x4E2A; timer &#x7684;&#x6700;&#x65B0;&#x503C;&#x4F5C;&#x4E3A;&#x4E00;&#x4E2A;&#x6570;&#x7EC4;&#x53D1;&#x51FA;</span>
<span class="token keyword">const</span> combined <span class="token operator">=</span> <span class="token function">combineLatest</span><span class="token punctuation">(</span>timerOne<span class="token punctuation">,</span> timerTwo<span class="token punctuation">,</span> timerThree<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> subscribe <span class="token operator">=</span> combined<span class="token punctuation">.</span><span class="token function">subscribe</span><span class="token punctuation">(</span>latestValues <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
  <span class="token comment">// &#x4ECE; timerValOne&#x3001;timerValTwo &#x548C; timerValThree &#x4E2D;&#x83B7;&#x53D6;&#x6700;&#x65B0;&#x53D1;&#x51FA;&#x7684;&#x503C;</span>
    <span class="token keyword">const</span> <span class="token punctuation">[</span>timerValOne<span class="token punctuation">,</span> timerValTwo<span class="token punctuation">,</span> timerValThree<span class="token punctuation">]</span> <span class="token operator">=</span> latestValues<span class="token punctuation">;</span>
  <span class="token comment">/*
      &#x793A;&#x4F8B;:
    timerOne first tick: &apos;Timer One Latest: 1, Timer Two Latest:0, Timer Three Latest: 0
    timerTwo first tick: &apos;Timer One Latest: 1, Timer Two Latest:1, Timer Three Latest: 0
    timerThree first tick: &apos;Timer One Latest: 1, Timer Two Latest:1, Timer Three Latest: 1
  */</span>
    console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>
      <span class="token template-string"><span class="token string">`Timer One Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>timerValOne<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">,
     Timer Two Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>timerValTwo<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">,
     Timer Three Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>timerValThree<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">`</span></span>
    <span class="token punctuation">)</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<h5 id="&#x793A;&#x4F8B;-2-&#x4F7F;&#x7528;-projection-&#x51FD;&#x6570;&#x7684;-combinelatest">&#x793A;&#x4F8B; 2: &#x4F7F;&#x7528; projection &#x51FD;&#x6570;&#x7684; combineLatest</h5>
<p>(
<a href="https://stackblitz.com/edit/typescript-prtbvd?file=index.ts&amp;devtoolsheight=100" target="_blank">StackBlitz</a>
| <a href="http://jsbin.com/codotapula/1/edit?js,console" target="_blank">jsBin</a> |
<a href="https://jsfiddle.net/btroncone/uehasmb6/" target="_blank">jsFiddle</a> )</p>
<pre class="language-"><code class="lang-js"><span class="token comment">// RxJS v6+</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> timer<span class="token punctuation">,</span> combineLatest <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;rxjs&apos;</span><span class="token punctuation">;</span>

<span class="token comment">// timerOne &#x5728;1&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerOne <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">1000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// timerTwo &#x5728;2&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerTwo <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">2000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// timerThree &#x5728;3&#x79D2;&#x65F6;&#x53D1;&#x51FA;&#x7B2C;&#x4E00;&#x4E2A;&#x503C;&#xFF0C;&#x7136;&#x540E;&#x6BCF;4&#x79D2;&#x53D1;&#x9001;&#x4E00;&#x6B21;</span>
<span class="token keyword">const</span> timerThree <span class="token operator">=</span> <span class="token function">timer</span><span class="token punctuation">(</span><span class="token number">3000</span><span class="token punctuation">,</span> <span class="token number">4000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token comment">// combineLatest &#x8FD8;&#x63A5;&#x6536;&#x4E00;&#x4E2A;&#x53EF;&#x9009;&#x7684; projection &#x51FD;&#x6570;</span>
<span class="token keyword">const</span> combinedProject <span class="token operator">=</span> <span class="token function">combineLatest</span><span class="token punctuation">(</span>
  timerOne<span class="token punctuation">,</span>
  timerTwo<span class="token punctuation">,</span>
  timerThree<span class="token punctuation">,</span>
  <span class="token punctuation">(</span>one<span class="token punctuation">,</span> two<span class="token punctuation">,</span> three<span class="token punctuation">)</span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token template-string"><span class="token string">`Timer One (Proj) Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>one<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">, 
              Timer Two (Proj) Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>two<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">, 
              Timer Three (Proj) Latest: </span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>three<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">`</span></span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// &#x8F93;&#x51FA;&#x503C;</span>
<span class="token keyword">const</span> subscribe <span class="token operator">=</span> combinedProject<span class="token punctuation">.</span><span class="token function">subscribe</span><span class="token punctuation">(</span>latestValuesProject <span class="token operator">=&gt;</span>
  console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span>latestValuesProject<span class="token punctuation">)</span>
<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<h5 id="&#x793A;&#x4F8B;-3-&#x7EC4;&#x5408;2&#x4E2A;&#x6309;&#x94AE;&#x7684;&#x4E8B;&#x4EF6;">&#x793A;&#x4F8B; 3: &#x7EC4;&#x5408;2&#x4E2A;&#x6309;&#x94AE;&#x7684;&#x4E8B;&#x4EF6;</h5>
<p>(
<a href="https://stackblitz.com/edit/typescript-ihcxud?file=index.ts&amp;devtoolsheight=50" target="_blank">StackBlitz</a>
| <a href="http://jsbin.com/buridepaxi/edit?html,js,output" target="_blank">jsBin</a> |
<a href="https://jsfiddle.net/btroncone/9rsf6t9v/14/" target="_blank">jsFiddle</a> )</p>
<pre class="language-"><code class="lang-js"><span class="token comment">// RxJS v6+</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> fromEvent<span class="token punctuation">,</span> combineLatest <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;rxjs&apos;</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> mapTo<span class="token punctuation">,</span> startWith<span class="token punctuation">,</span> scan<span class="token punctuation">,</span> tap<span class="token punctuation">,</span> map <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&apos;rxjs/operators&apos;</span><span class="token punctuation">;</span>

<span class="token comment">// &#x7528;&#x6765;&#x8BBE;&#x7F6E; HTML &#x7684;&#x8F85;&#x52A9;&#x51FD;&#x6570;</span>
<span class="token keyword">const</span> <span class="token function-variable function">setHtml</span> <span class="token operator">=</span> id <span class="token operator">=&gt;</span> val <span class="token operator">=&gt;</span> <span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span>id<span class="token punctuation">)</span><span class="token punctuation">.</span>innerHTML <span class="token operator">=</span> val<span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> <span class="token function-variable function">addOneClick$</span> <span class="token operator">=</span> id <span class="token operator">=&gt;</span>
  <span class="token function">fromEvent</span><span class="token punctuation">(</span>document<span class="token punctuation">.</span><span class="token function">getElementById</span><span class="token punctuation">(</span>id<span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token string">&apos;click&apos;</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">pipe</span><span class="token punctuation">(</span>
    <span class="token comment">// &#x5C06;&#x6BCF;&#x6B21;&#x70B9;&#x51FB;&#x6620;&#x5C04;&#x6210;1</span>
    <span class="token function">mapTo</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
    <span class="token function">startWith</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
    <span class="token comment">// &#x8FFD;&#x8E2A;&#x8FD0;&#x884C;&#x4E2D;&#x7684;&#x603B;&#x6570;</span>
    <span class="token function">scan</span><span class="token punctuation">(</span><span class="token punctuation">(</span>acc<span class="token punctuation">,</span> curr<span class="token punctuation">)</span> <span class="token operator">=&gt;</span> acc <span class="token operator">+</span> curr<span class="token punctuation">)</span><span class="token punctuation">,</span>
    <span class="token comment">// &#x4E3A;&#x9002;&#x5F53;&#x7684;&#x5143;&#x7D20;&#x8BBE;&#x7F6E; HTML</span>
    <span class="token function">tap</span><span class="token punctuation">(</span><span class="token function">setHtml</span><span class="token punctuation">(</span><span class="token template-string"><span class="token string">`</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>id<span class="token interpolation-punctuation punctuation">}</span></span><span class="token string">Total`</span></span><span class="token punctuation">)</span><span class="token punctuation">)</span>
  <span class="token punctuation">)</span><span class="token punctuation">;</span>

<span class="token keyword">const</span> combineTotal$ <span class="token operator">=</span> <span class="token function">combineLatest</span><span class="token punctuation">(</span><span class="token function">addOneClick$</span><span class="token punctuation">(</span><span class="token string">&apos;red&apos;</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token function">addOneClick$</span><span class="token punctuation">(</span><span class="token string">&apos;black&apos;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
  <span class="token punctuation">.</span><span class="token function">pipe</span><span class="token punctuation">(</span><span class="token function">map</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">[</span>val1<span class="token punctuation">,</span> val2<span class="token punctuation">]</span><span class="token punctuation">)</span> <span class="token operator">=&gt;</span> val1 <span class="token operator">+</span> val2<span class="token punctuation">)</span><span class="token punctuation">)</span>
  <span class="token punctuation">.</span><span class="token function">subscribe</span><span class="token punctuation">(</span><span class="token function">setHtml</span><span class="token punctuation">(</span><span class="token string">&apos;total&apos;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>
<h6 id="html">HTML</h6>
<pre class="language-"><code class="lang-html"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&apos;</span>red<span class="token punctuation">&apos;</span></span><span class="token punctuation">&gt;</span></span>Red<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">&gt;</span></span>
  <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>button</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&apos;</span>black<span class="token punctuation">&apos;</span></span><span class="token punctuation">&gt;</span></span>Black<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>button</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>Red: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>redTotal<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>Black: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>blackTotal<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>div</span><span class="token punctuation">&gt;</span></span>Total: <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>span</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>total<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>span</span><span class="token punctuation">&gt;</span></span> <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>div</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<h3 id="&#x5176;&#x4ED6;&#x8D44;&#x6E90;">&#x5176;&#x4ED6;&#x8D44;&#x6E90;</h3>
<ul>
<li><a href="https://cn.rx.js.org/class/es6/Observable.js~Observable.html#instance-method-combineLatest" target="_blank">combineLatest</a> <img align="absmiddle" alt=":newspaper:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/newspaper.png" title=":newspaper:"> - &#x5B98;&#x65B9;&#x6587;&#x6863;</li>
<li><a href="https://egghead.io/lessons/rxjs-combining-streams-with-combinelatest?course=step-by-step-async-javascript-with-rxjs" target="_blank">&#x4F7F;&#x7528; combineLatest &#x7EC4;&#x5408;&#x6D41;</a> <img align="absmiddle" alt=":video_camera:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/video_camera.png" title=":video_camera:"> <img align="absmiddle" alt=":dollar:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/dollar.png" title=":dollar:"> - John Linquist</li>
<li><a href="https://egghead.io/lessons/rxjs-combination-operator-combinelatest?course=rxjs-beyond-the-basics-operators-in-depth" target="_blank">&#x7EC4;&#x5408;&#x64CD;&#x4F5C;&#x7B26;: combineLatest</a> <img align="absmiddle" alt=":video_camera:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/video_camera.png" title=":video_camera:"> <img align="absmiddle" alt=":dollar:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/dollar.png" title=":dollar:"> - Andr&#xE9; Staltz</li>
</ul>
<hr>
<blockquote>
<p><img align="absmiddle" alt=":file_folder:" class="emoji" src="../../gitbook/gitbook-plugin-advanced-emoji/emojis/file_folder.png" title=":file_folder:"> &#x6E90;&#x7801;:  <a href="https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/combineLatest.ts" target="_blank">https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/combineLatest.ts</a></p>
</blockquote>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="combineall.html" class="navigation navigation-prev " aria-label="Previous page: combineAll">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="concat.html" class="navigation navigation-next " aria-label="Next page: concat">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"combineLatest","level":"2.2.1.2","depth":3,"next":{"title":"concat","level":"2.2.1.3","depth":3,"path":"operators/combination/concat.md","ref":"operators/combination/concat.md","articles":[]},"previous":{"title":"combineAll","level":"2.2.1.1","depth":3,"path":"operators/combination/combineall.md","ref":"operators/combination/combineall.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock","advanced-emoji","prism","highlight","copy-code-button","edit-link","github","github-buttons"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"prism":{},"github":{"url":"https://github.com/RxJS-CN/learn-rxjs-operators"},"search":{},"lunr":{"maxIndexSize":1000000},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"github-buttons":{"buttons":[{"user":"RxJS-CN","repo":"learn-rxjs-operators","type":"star","size":"small","count":true},{"user":"RxJS-CN","repo":"learn-rxjs-operators","type":"fork","size":"small","count":true}]},"copy-code-button":{},"advanced-emoji":{"embedEmojis":false},"include-codeblock":{"check":false,"edit":false,"fixlang":false,"lang":"","template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"帮忙纠错","base":"https://github.com/RxJS-CN/learn-rxjs-operators/tree/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"index.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"学习 RxJS 操作符","gitbook":"3.1.1"},"file":{"path":"operators/combination/combinelatest.md","mtime":"2018-10-15T09:07:06.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2018-10-15T09:31:22.754Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

